package com.icss.day01;

public class Test5 {
    public static void main(String[] args) {

        // r=2求周长是多少？
        int r = 2;
        double d = 2 * r * Math.PI;
        System.out.println("2周长是" + d);
        // r=3求周长是多少？
        r = 3;
        d = 2 * r * Math.PI;
        System.out.println("3周长是" + d);

        // r=2求周长是多少？
        Circle c = new Circle();
        c.r = 2;
        System.out.println(c.zhouchang());
        // r=3求周长是多少？
        Circle c1 = new Circle();
        c1.r = 3;
        System.out.println(c1.zhouchang());
    }
}
